package com.qf.day02;

/**
 * 计算器  Lambda表达式相关面试题
 *
 */
@FunctionalInterface //函数接口的特性
interface Foo{
    // +
    int add(int x,int y);
    // -
    default int sub(int x,int y){
        return x-y;
    }
    // /
    static int div(int x,int y){
        return x/y;
    }
    //*
    default int xx(int x,int y){
        return x-y;
    }
}
/**
 * @author lixu
 */
public class ThreadDemo2 {


    public static void main(String[] args) {
        //Lambda表达式
        Foo foo = (x,y) -> x+y;
        System.out.println(foo.add(100, 200));

        System.out.println(foo.sub(200, 100));

        System.out.println(Foo.div(300, 100));


  /*      new Thread(() -> {//Lambda表达式
            System.out.println(Thread.currentThread().getName());
        },"AA").start();*/

    }
}
